package org.morningangel.android.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.morningangel.bean.Activity;
import org.morningangel.bean.User;

public class ActivityBeanList implements Serializable {
	private static final long serialVersionUID = 5574609299673614852L;
	private String isSuccess;
	private String userId;
	private String userName;
	private String telNum;
	private String email;
	private String weibo;
	private String qq;
	private String activitiyKindId;
	private List<ActivityBean> list;

	public ActivityBeanList() {
		this.isSuccess = "0";
	}

	public ActivityBeanList(User user, Integer activtiyKindId,
			List<Activity> activitys) {
		this.isSuccess = "1";
		this.userId = user.getId() + "";
		this.userName = user.getUsername();
		if (user.getPhone() == null || user.getPhone().trim().equals("")) {
			this.telNum = "";
		} else {
			this.telNum = user.getPhone();
		}
		if (user.getEmail() == null || user.getEmail().trim().equals("")) {
			this.email = "";
		} else {
			this.email = user.getEmail();
		}
		if (user.getWeibo() == null || user.getWeibo().trim().equals("")) {
			this.weibo = "";
		} else {
			this.weibo = user.getWeibo();
		}
		if (user.getQq() == null || user.getQq().trim().equals("")) {
			this.qq = "";
		} else {
			this.qq = user.getQq();
		}
		this.activitiyKindId = activtiyKindId + "";
		this.list = new ArrayList<ActivityBean>();
		for (int i = 0; i < activitys.size(); ++i) {
			ActivityBean a = new ActivityBean(activitys.get(i));
			list.add(a);
		}

	}

	public String getIsSuccess() {
		return isSuccess;
	}

	public void setIsSuccess(String isSuccess) {
		this.isSuccess = isSuccess;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getActivitiyKindId() {
		return activitiyKindId;
	}

	public void setActivitiyKindId(String activitiyKindId) {
		this.activitiyKindId = activitiyKindId;
	}

	public List<ActivityBean> getList() {
		return list;
	}

	public void setList(List<ActivityBean> list) {
		this.list = list;
	}

	public String getTelNum() {
		return telNum;
	}

	public void setTelNum(String telNum) {
		this.telNum = telNum;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWeibo() {
		return weibo;
	}

	public void setWeibo(String weibo) {
		this.weibo = weibo;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

}
